import Vue from 'vue'
import Router from 'vue-router'

import PagesView from '@/views/pageView'
import HomeView from '@/views/homeView'
import NiurenView from '@/views/niurenView'
import AccountView from '@/views/accountView'
import MyinfoView from '@/views/myinfoView'

Vue.use(Router)

export default new Router({
    routes: [
        {
            path: '/',
            redirect: '/pages/'
        },{
            path: '/pages',
            component: PagesView,
            children: [
                {
                    path: '',
                    redirect: '/pages/home'
                },{
                    path: 'home',
                    name: 'HomeView',
                    component: HomeView
                },{
                    path: 'niuren',
                    name: 'NiurenView',
                    component: {
                        niuren: NiurenView
                    }
                },{
                    path: 'account',
                    name: 'AccountView',
                    component: {
                        account: AccountView
                    }
                },{
                    path: 'myinfo',
                    name: 'MyinfoView',
                    component: {
                        myinfo: MyinfoView
                    }
                }
            ]
        }

    ]
})
